package com.homegoods.discover.ui.activity;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.homegoods.discover.R;
import com.homegoods.discover.databinding.DiscoverActivityMessageDetailBinding;
import com.homegoods.discover.presenter.MessageDetailPresenter;
import com.homegoods.aroutercomment.ARouterPath;
import com.kedll.library.base.MyBaseFragmentActivity;
import com.kedll.library.mvp.BaseView;

/**
 * @author QiQi
 * @ClassName: MessageDetailActivity
 * @date 2018/10/3
 * @description
 */
@Route(path = ARouterPath.PATH_MESSAGE_DETAIL)
public class MessageDetailActivity extends MyBaseFragmentActivity<DiscoverActivityMessageDetailBinding, MessageDetailPresenter> implements BaseView {

    @Autowired
    public String id;

    @Override
    protected void initData(Bundle savedInstanceState) {
        super.initData(savedInstanceState);
        ARouter.getInstance().inject(this);
    }

    @Override
    protected void initToolBar(Bundle savedInstanceState) {
        super.initToolBar(savedInstanceState);
        setTitle("消息详情");
    }

    @Override
    protected MessageDetailPresenter getPresenter() {
        return new MessageDetailPresenter(this);
    }

    @Override
    protected int getLayout() {
        return R.layout.discover_activity_message_detail;
    }

    @Override
    protected void initEvent() {
        mPresenter.loadDetail(id);
    }
}
